import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'Home',
        component: Home,
        meta: {
            showTab: true
        }
    },
    {
        path: '/collect',
        name: 'Collect',
        component: () =>
            import ('../views/Collect/Collect.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/mine',
        name: 'Mine',
        component: () =>
            import ('../views/Mine/Mine.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: () =>
            import ('../views/Mine/Login.vue'),
        meta: {
            showTab: false
        }
    },
    {
        path: '/details',
        name: 'details',
        component: () =>
            import ('../views/Collect/details.vue'),
        meta: {
            showTab: true,
            // id: 1
        },
        query: {
            id: 1
        }
    }
]

const router = new VueRouter({
    routes
})

export default router